<!--提示框内容-->
<template>
  <view class="buttonGroup">
    <view
      v-if="type == 'submit'"
      class="submit"
      :style="{
        width,
        height,
        margin,
        color,
        background: bgColor,
        'line-height': height,
        'font-size': fontSize,
        'border-radius': radius,
      }"
      @tap="onTap"
    >
      {{ submitText }}
    </view>

    <view
      v-if="type == 'plain'"
      class="plain"
      :style="{
        width,
        height,
        margin,
        color,
        'line-height': height,
        border: `2rpx solid ${borderColor}`,
        'border-radius': radius,
        'font-size': fontSize,
      }"
      @tap="onTap"
    >
      {{ submitText }}
    </view>

    <view 
      class="double-btns" 
      v-if="type == 'double'" 
      :style="customStyle"
    >
      <view :class="[leftPlain ? 'left-plain' : 'left' ]" @tap="onTap" data-type="cancel">{{ leftText }}</view>
      <view class="confirm" @tap="onTap" data-type="confirm">{{ submitText }}</view>
    </view>

    <button
      v-if="type == 'share'"
      open-type="share"
      class="submit"
      :style="{
        width,
        height,
        margin,
        color,
        background: bgColor,
        'line-height': height,
        'font-size': fontSize,
        'border-radius': radius,
      }"
      @tap="onTap"
    >
      {{ submitText }}
    </button>

     <button
      v-if="type == 'phoneNumber'"
      open-type="getPhoneNumber"
      class="submit"
      :style="{
        width,
        height,
        margin,
        color,
        background: bgColor,
        'line-height': height,
        'font-size': fontSize,
        'border-radius': radius,
      }"
      @getphonenumber="getphonenumber"
    >
      {{ submitText }}
    </button>

  </view>
</template>
<script src="./indexMod.js">
</script>
<style src="./indexStyle.scss">
</style>